<%@page import="dto.ReservationDTO"%>
<%@page import="java.util.ArrayList" %>
<%@page import="util.Utilities"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%@page import="dto.MemberDTO"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<c:set var="dto" scope="session" value='<%= (MemberDTO)session.getAttribute("login_info")%>'/>
<c:choose>
	<c:when test="${empty requestScope.list  }">
		<h3>No reservation information</h3>
	</c:when>
	<c:otherwise>
		<h3>My reservation - travler</h3>
		<table border="2" width="1200" cellspacing="0" cellpadding="3" bordercolor="#999999" style="border-collapse:collapse;" rules="rows" frame="box">
			<tr>
				<td align="center">Number</td>
				<td align="center">Name</td>
				<td align="center">CheckIn</td>
				<td align="center">CheckOut</td>
				<td align="center">CheckIn Time</td>
				<td align="center">Reservation State</td>
				<td align="center">PostScript</td>

			</tr>
			<c:forEach items="${requestScope.list }" var="rdto" varStatus="cnt">
			<tr align="center">
				<td align="center">${cnt.count }</td>
				<td align="center"><a href="/${initParam.context_root }/reservation_info_detail.do?
						roomNo=${rdto.roomNo }&reservationNo=${rdto.reservationNo}">${rdto.title}</a></td>
				<td align="center">${rdto.checkin }</td>
				<td align="center">${rdto.checkout }</td>
				<td align="center">${rdto.checkinTime }hour</td>
				<c:if test="${rdto.reservationCode =='W' }">
					<td align="center">Wait</td>
				</c:if>
				<c:if test="${rdto.reservationCode == 'Y' }">
					<td align="center">Complete</td>
				</c:if>
				<c:if test="${rdto.reservationCode == 'N' }">
					<td align="center">Refuse</td>
				</c:if>				
				<td align="center"><a href="/${initParam.context_root}/postScript_writeform.do?roomno=${rdto.roomNo }&resno=${rdto.reservationNo}&postScript_memberid=${sessionScope.dto.member_id}">postScript</a></td>
				
			</tr>
			</c:forEach>
		</table>
	</c:otherwise>
</c:choose>
</body>
</html>